#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
/*
 * Copyright © 2014, Finium Sdn Bhd, All Rights Reserved
 * 
 * LoginDTO.java
 * Modification History
 * *************************************************************
 * Date				Author						Comment
 * Feb 27, 2012		Magesh George				Created
 * *************************************************************
 */
package ${package}.dto;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

import ${package}.AppConstants;
import ${package}.support.validation.SecondGroup;

import org.hibernate.validator.constraints.NotEmpty;

/**
 * Login DTO
 * 
 * @author Magesh George
 * 
 */
@XmlRootElement(name = "login")
public class LoginDTO extends BaseDTO
{
    private static final long serialVersionUID = 1L;

    @NotEmpty(message = "email.null")
    @Pattern(
            regexp = "^[_A-Za-z0-9-]+(${symbol_escape}${symbol_escape}.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(${symbol_escape}${symbol_escape}.[A-Za-z0-9]+)*(${symbol_escape}${symbol_escape}.[A-Za-z]{2,})${symbol_dollar}",
            message = "email.not.valid", groups = SecondGroup.class)
    private String email;

    @NotEmpty(message = "password.null")
    @Size(min = AppConstants.MIN_3, max = AppConstants.MAX_80,
            message = "password.length", groups = SecondGroup.class)
    private String password;

    /**
     * @return the email
     */
    public String getEmail()
    {
        return email;
    }

    /**
     * @param email
     *            the email to set
     */
    public void setEmail(String email)
    {
        this.email = email;
    }

    /**
     * @return the password
     */
    public String getPassword()
    {
        return password;
    }

    /**
     * @param password
     *            the password to set
     */
    public void setPassword(String password)
    {
        this.password = password;
    }

}
